//
//  MessageSubEntity.m
//  QQplayground
//
//  Created by 王昭的Mac Air on 2018/9/17.
//  Copyright © 2018年 zhang. All rights reserved.
//

#import "MessageSubEntity.h"

@implementation MessageSubEntity

- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    if ([self init]) {
        self = [MessageSubEntity yy_modelWithDictionary:dictionary];
        _user_info = [[User alloc] initWithDictionary:dictionary[@"user_info"]];
        _mapping = [[MappingEntity alloc] initWithDictionary:dictionary[@"mapping"][@"mapping_info"]];
    }
    return self;
}

+ (NSDictionary<NSString *,id> *)modelCustomPropertyMapper
{
    return @{
             @"m_id" : @"id",
             @"feed_id" : @"feed_id",
             @"type" : @"type",
             @"content" : @"content",
             @"mapping_read" : @"mapping_read",
             @"add_time" : @"add_time"
             };
}

@end

@implementation MappingEntity

- (instancetype)initWithDictionary:(NSDictionary *)dictionary
{
    if ([self init]) {
        self = [MappingEntity yy_modelWithDictionary:dictionary];
    }
    return self;
}

+ (NSDictionary<NSString *,id> *)modelCustomPropertyMapper
{
    return @{
             @"m_id" : @"id",
             @"type" : @"type",
             @"user_name" : @"user_name"
             };
}


@end
